package com.kavadani.profiles;

import org.json.JSONException;
import org.json.JSONObject;

public class ProfileItem {
	private String image = null;
	private String label = null;
	private String text = null;
	private int id;
	
	public ProfileItem(JSONObject json) {
		try { 
			if (json.has("image")) 
				this.image = json.getString("image");
			
//			if (json.has("id")) 
//				this.id = json.getInt("id");
			
			if (json.has("username")) 
				this.text = json.getString("username");
			else
				this.text = "No text";
			
			if (json.has("full-name")) 
				this.label = json.getString("full-name");
			else
				this.label = "No text";
			
//			if (json.has("categories")) 
//				this.text = json.getString("categories");
//			else
//				this.text = "No text";
		} catch (JSONException e) { } 
	}
	
	public String getImage() {
		return image;
	}
	public String getLabel() {
		return label;
	}
	public String getText() {
		return text;
	}

	public int getId() {
		return id;
	}
	
	
}
